/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package commons.codec.soundex;

import org.apache.commons.codec.language.Soundex;

/**
 *
 * @author WangShuai
 */
public class Demo1 {

    public static void main(String[] args) {
        //比较字符串的发音相似性
        Soundex soundex = new Soundex();

        String obrienSoundex = soundex.soundex("O'Brien");
        String obrianSoundex = soundex.soundex("O'Brian");
        String obryanSoundex = soundex.soundex("O'Bryan");

        String footSoundex = soundex.soundex("foot");
        String foodSoundex = soundex.soundex("food");

        System.out.println("O'Brien soundex: " + obrienSoundex);
        System.out.println("O'Brian soundex: " + obrianSoundex);
        System.out.println("O'Bryan soundex: " + obryanSoundex);

        System.out.println("Foot soundex: " + footSoundex);
        System.out.println("Food soundex: " + foodSoundex);

    }
}
